<template>
  <div>
    <h2>我是用户信息界面</h2>
    <span>我是参数:{{userId}}</span>
    <span>我是参数2：{{$route.params.userId}}</span>
    <button @click="btnClick">点击</button>
  </div>
</template>

<script>
export default {
  name: "User",
  data(){

  },
  computed: {
    userId(){
      return this.$route.params.userId
    }
  },
  methods: {
    btnClick(){
      console.log(this.$router);
      console.log(this.$route);
    }
  }
}
</script>

<style scoped>

</style>